import { Module } from '@nestjs/common';
import { JwtModule } from '@nestjs/jwt';
import { AuthService } from './auth.service';
import { JwtStrategy } from './jwt.strategy';
import { PassportModule } from '@nestjs/passport';
import { AdminModule } from 'src/admin/admin.module';
import { jwtKey } from 'src/config/jwt.config';
 
@Module({
  imports: [
    // forwardRef(() => AdminModule),
    PassportModule,
    AdminModule,
    JwtModule.register({
      secret: jwtKey.key,
      signOptions: { expiresIn: '1d' },
    })
  ],
  // controllers: [AuthController],
  providers: [AuthService, JwtStrategy],
  exports: [AuthService],
})
export class AuthModule { }